package com.hushi.test;

import com.hushi.dao.CustomerDao;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

/**
 *测试xml的junit
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class Demo1 {
    @Resource(name = "customerDaoImpl")
    private CustomerDao customerDaoImpl;
    @Test
    public void test(){
        /*ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
		CustomerDao customerDao = (CustomerDao)ac.getBean("customerDao"); */
        customerDaoImpl.save();
    }
}